/**
 * @type {String}
 *
 * @properties={typeid:35,uuid:"1FBDC02F-5368-4781-89A5-D546AEE58814"}
 */
var fDescripcion = null;

/**
 * @type {String}
 *
 * @properties={typeid:35,uuid:"50F0CD13-3180-4789-AEE1-5418C2905FE6"}
 */
var fCodigo = null;

/**
 * @type {Number}
 *
 * @properties={typeid:35,uuid:"443AE8C2-2884-4D20-871C-A4CA87B032E3",variableType:4}
 */
var fMarca = null;

/**
 * @type {Number}
 *
 * @properties={typeid:35,uuid:"E17E5130-BF1C-4C6A-9FD7-55F7EE8CEF7F",variableType:4}
 */
var fSubcategoria = null;

/**
 * @type {Number}
 *
 * @properties={typeid:35,uuid:"6991678F-C97E-4513-B9A5-7F2A8F2BA193",variableType:4}
 */
var fCategoria = null;


/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"CCC60E94-7F48-442D-840C-C8DC88C21E16"}
 */
function iraDetalle(event) {
	globals.mostrarForm('productos_dtl')
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"B94BBCD5-8198-4FE3-ACD2-C80E72426C3B"}
 * @AllowToRunInFind
 */
function buscar(event) {
	if (controller.find() == false)
	{
		globals.DIALOGS.showErrorDialog('Error','Error al iniciar la búsqueda','OK')
		return
	}
	prod_categoria_id 		= fCategoria
	prod_subcategoria_id 	= fSubcategoria
	prod_marca_id 			= fMarca
	if (fDescripcion != null)	
		descripcion = '#%' + fDescripcion + '%'
	if (fCodigo != null)
		cod_producto = '#' + fCodigo
	
	if (controller.search() == 0)
		globals.DIALOGS.showInfoDialog('Aviso','La búsqueda no tiene resultados','OK')
	
}
